Import('RTT_ROOT')
Import('rtconfig')
from building import *

cwd     = os.path.join(str(Dir('#')), 'applications')

src	= Glob('*.c')
CPPPATH = [cwd, str(Dir('#'))]

if GetDepend('BSP_USING_DEMO_EEPROM'):
    src += ['demo_eeprom/demo_eeprom.c']

if GetDepend('BSP_USING_DEMO_THREAD'):
    src += ['demo_thread/demo_thread.c']

if GetDepend('BSP_USING_DEMO_HEELO'):
    src += ['demo_hello/hello.c']

if GetDepend('BSP_USING_DEMO_TCP_CLIENT'):
    src += ['tcp_client/demo_tcp_client.c']
if GetDepend('BSP_USING_DEMO_TCP_SERVER'):
    src += ['tcp_client/demo_tcp_server.c']
if GetDepend('BSP_USING_DEMO_UDP'):
    src += ['tcp_client/demo_udp.c']
    
group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH)

Return('group')
